import 'package:xinxuan/vo/common_vo/common_pagination_vo.dart';

class TeamMembersVo {
  
  List<MemberItem>? data;
  TeamMembersMeta? meta;

  TeamMembersVo({this.data, this.meta});

  TeamMembersVo.fromJson(Map<String, dynamic> json) {
    if (json['data'] != null) {
      data = [];
      json['data'].forEach((v) {
        data!.add(new MemberItem.fromJson(v));
      });
    }
    meta = json['meta'] != null ? new TeamMembersMeta.fromJson(json['meta']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    if (this.meta != null) {
      data['meta'] = this.meta!.toJson();
    }
    return data;
  }
}

class MemberItem {
  String? nickname;
  String? mobile;
  String? sevenDayOrderNum;
  String? sameDayOrderNum;
  String? sameDayBuyPrice;
  String? totalSubsidy;
  String? createdAt;

  MemberItem(
      {this.nickname,
      this.mobile,
      this.sevenDayOrderNum,
      this.sameDayOrderNum,
      this.sameDayBuyPrice,
      this.totalSubsidy,
      this.createdAt});

  MemberItem.fromJson(Map<String, dynamic> json) {
    nickname = json['nickname'];
    mobile = json['mobile'];
    sevenDayOrderNum = json['seven_day_order_num'];
    sameDayOrderNum = json['same_day_order_num'];
    sameDayBuyPrice = json['same_day_buy_price'];
    totalSubsidy = json['total_subsidy'];
    createdAt = json['created_at'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['nickname'] = this.nickname;
    data['mobile'] = this.mobile;
    data['seven_day_order_num'] = this.sevenDayOrderNum;
    data['same_day_order_num'] = this.sameDayOrderNum;
    data['same_day_buy_price'] = this.sameDayBuyPrice;
    data['total_subsidy'] = this.totalSubsidy;
    data['created_at'] = this.createdAt;
    return data;
  }
}

class TeamMembersMeta {
  CommonPagination? pagination;

  TeamMembersMeta({this.pagination});

  TeamMembersMeta.fromJson(Map<String, dynamic> json) {
    pagination = json['pagination'] != null
        ? new CommonPagination.fromJson(json['pagination'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.pagination != null) {
      data['pagination'] = this.pagination!.toJson();
    }
    return data;
  }
}
